#include "arraylist1.h"
void arraylist::initalize(){
		for(int i=0;i<6;i++){
			n1[i]=0;
		}
	head=0;
	tail=0;

}
void arraylist::empty(){
	for(int i=0;i<6;i++){
		n1[i]=0;
	}
}
void arraylist::enque(int input){
		n1[tail] = input;
		tail++;
		tail%=6;
}
int arraylist::deque(){
	if (head==tail){
		return 0;
	}
		int returnval=n1[head];
		n1[head]=0;
		head++;
		head%=6;
		return returnval;

}
int main(){
	arraylist al;
	al.initalize();
	al.enque(3);
	al.enque(5);
	al.enque(7);
	al.enque(9);
	al.enque(20);
	for(int i=0;i<6;i++){
		cout<<al.n1[i];
		cout<<"  ";
		}
	al.deque();
	al.deque();
	al.deque();
	cout<<"\n";
	for(int i=0;i<6;i++){
		cout<<al.n1[i];
		cout<<"  ";
		}
	cout<<"\n";
	al.empty();
		for(int i=0;i<6;i++){
		cout<<al.n1[i];
		cout<<"  ";
		}

while (true){
}

}


arraylist::arraylist(void)
{
}


arraylist::~arraylist(void)
{
}
